-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clarifications for documentation #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this will be my last PR before 0.4.1 or 0.5.0 (which one should be used? considering &'static str has become &T).
I think in 0.x.y crates, the x is kinda major and y is minor. &T being a superset of &'static str, I guess we could go with 0.4.1
This library introduces the marker trait [`ImplicitClone`](https://docs.rs/implicit-clone/latest/implicit_clone/trait.ImplicitClone.html) intended for | ||
cheap-to-clone types that should be allowed to be cloned implicitly. It enables host libraries | ||
using this crate to have the syntax of [`Copy`][std::marker::Copy] while actually calling the | ||
[`Clone`][std::clone::Clone] implementation instead (usually when host library does such syntax | ||
in a macro). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like very much the new wording 👍 thanks!
@@ -62,7 +73,7 @@ impl_implicit_clone!( | |||
f32, f64, | |||
bool, | |||
usize, isize, | |||
&'static str, char, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
Co-authored-by: Cecile Tonglet <[email protected]>
This PR modifies the text of
lib.rs
andtrait ImplicitClone
documentations, hopefully clarifying some points that caused #6.Also while writing new documentation, I've noticed missing implementation for a
Copy
type&T
. There was present implementation for&'static str
, but it not only does not have to be'static
, it does not even have to bestr
- it can beT: ?Sized
.Added some tests for the
lib.rs
types, as means of more documentation and examples of using the crate.I believe this will be my last PR before 0.4.1 or 0.5.0 (which one should be used? considering
&'static str
has become&T
).